import valid from './valid'

export const validateMobile = (rule, value, callback) => {
    if (!value) {
        callback(new Error('请输入手机号码'))
    } else if (!valid.isMobile(value)) {
        callback(new Error('手机号码格式不对'))
    } else {
        callback()
    }
}

